import request from '@/utils/request'
export function getPropertyList(params) {
  return request({
    url: `/properties`,
    params
  })
}
export function addProperty(data) {
  return request({
    method: 'post',
    url: '/properties',
    data
  })
}
export function delProperty(id) {
  return request.delete(`/properties/${id}`)
}
export function getPropertyById(id) {
  return request.get(`/properties/${id}`)
}
export function editPropertyById(data) {
  return request({
    method: 'put',
    url: `/properties/${data.id}`,
    data
  })
}
// 获取房产数量
export function getPropertyNum(params) {
  return request({
    url: `/properties/count`,
    params
  })
}
// 获取客户列表
export function getAgentList(params) {
  return request({
    url: '/agents/',
    params
  })
}
